﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EFong.ServicesInterface;
using EFong.BL;

namespace EFong.Services
{
    public class PrintService : IPrintService, IService
    {
        public Contract.ServiceResult<Contract.PFlightOrder> GetPrintFlightOrder(Guid id)
        {
            try
            {
                BusinessBL businessBL = new BusinessBL();
                return this.Return<Contract.PFlightOrder>(businessBL.GetPrintFlightOrder(id));
            }
            catch (BusinessException be) { return this.Fail<Contract.PFlightOrder>(be); }
            catch (Exception e) { return this.Fail<Contract.PFlightOrder>(e); }
        }

        public Contract.ServiceResult<Contract.PTrainOrder> GetPrintTrainOrder(Guid id)
        {
            try
            {
                BusinessBL businessBL = new BusinessBL();
                return this.Return<Contract.PTrainOrder>(businessBL.GetPrintTrainOrder(id));
            }
            catch (BusinessException be) { return this.Fail<Contract.PTrainOrder>(be); }
            catch (Exception e) { return this.Fail<Contract.PTrainOrder>(e); }
        }
    }
}
